﻿using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using System.Windows.Input;
using System.Windows.Controls;
using ReflectionStudio.Core.Events;
namespace WPFExcelReport
{
    public partial class TVWQC
    {
        /*
         
           <DataGridTemplateColumn Header="支数值"   Width="48">
                    <DataGridTemplateColumn.CellTemplate>
                        <DataTemplate >
                            <Grid >
                                <ex:NumericBox Text="{Binding X001}"/>
                            </Grid>
                        </DataTemplate>
                    </DataGridTemplateColumn.CellTemplate>
                </DataGridTemplateColumn>
         */
        public TVWQC()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VABFOLGE();
            this.DataContext = MV;
            InitializeComponent();
            IsQC = true;

        } 
        public override void OnEXAUFChg(string vlaue)
        { 
            TBMain.Clear();
            if (EXAUF.Length == 0)
                return;
            dwData = TBMain.NewRow();
            dwData["ABFMANDANT"] = app.Mandant;
            dwData["ABFKSTKRS"] = ART;
            dwData["ABFPLANKZ"] = EXAUF.Substring(0+4+8+1+20+2+10+10+10+10+7+10,10);
            dwData["ABFRUESTFAM"] = EXAUF.Substring(0 + 4 + 8 + 1 + 20 + 2 , 10);
            dwData["ABFAGANG"] = "'XS             '";
            dwData["ABFMNRKRS"] = GPPARTIEC;
            dwData["ABFNEUBEN"] = "";
            dwData["ABFFILLER"] = VQPMERKM.Instance.TTLQT(); 
            SResult = TMV.QABF10(dwData);  
            MergeData(SResult, false); 
            base.OnEXAUFChg(vlaue);
        }
    }
}
